home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / SASC_6.0_Disk_3.adf / Compiler_headers / Include / time.h < prev   
C/C++ Source or Header  |  1992-07-30  |  2KB  |  111 lines

  1. /* Copyright (c) 1992 SAS Institute, Inc., Cary, NC USA */
  2. /* All Rights Reserved */
  3.  
  4.  
  5. #ifndef _TIME_H
  6. #define _TIME_H 1
  7.  
  8.  
  9. #ifndef NULL
  10. #define NULL 0L
  11. #endif
  12.  
  13. #define CLOCKS_PER_SEC  1000
  14. #define CLK_TCK  CLOCKS_PER_SEC
  15.  
  16. #ifndef _SIZE_T
  17. #define _SIZE_T 1
  18. typedef unsigned int size_t;
  19. #endif
  20.  
  21. typedef unsigned long clock_t;
  22.  
  23. #ifndef _TIME_T
  24. #define _TIME_T 1
  25. typedef long time_t;
  26. #endif
  27.  
  28.  
  29. /**
  30. *
  31. * This structure contains the unpacked time as returned by "gmtime".
  32. *
  33. */
  34.  
  35. struct tm {
  36.     int tm_sec;      /* seconds after the minute */
  37.     int tm_min;          /* minutes after the hour */
  38.     int tm_hour;         /* hours since midnight */
  39.     int tm_mday;         /* day of the month */
  40.     int tm_mon;          /* months since January */
  41.     int tm_year;         /* years since 1900 */
  42.     int tm_wday;         /* days since Sunday */
  43.     int tm_yday;         /* days since January 1 */
  44.     int tm_isdst;        /* Daylight Savings Time flag */
  45. };
  46.  
  47.  
  48. /***
  49. *
  50. *     ANSI time functions.
  51. *
  52. ***/
  53.  
  54. extern clock_t clock(void);
  55. extern double difftime(time_t, time_t);
  56. extern time_t mktime(struct tm *);
  57. extern time_t time(time_t *);
  58.  
  59. extern char *asctime(const struct tm *);
  60. extern char *ctime(const time_t *);
  61. extern struct tm *gmtime(const time_t *);
  62. extern struct tm *localtime(const time_t *);
  63. extern size_t strftime(char *, size_t, const char *, const struct tm *);
  64.  
  65.  
  66. #ifndef _STRICT_ANSI
  67.  
  68. /***
  69. *
  70. *     SAS time functions
  71. *
  72. ***/
  73.  
  74. void getclk(unsigned char *);
  75. int  chgclk(unsigned char *);
  76.  
  77. void utunpk(long, char *);
  78. long utpack(char *);
  79. int timer(unsigned int *);
  80. int datecmp(struct DateStamp *, struct DateStamp *);
  81.  
  82. time_t __datecvt(struct DateStamp *);
  83. struct DateStamp *__timecvt(time_t);
  84.  
  85. /* for UNIX compatibility */
  86. extern void      __tzset(void);
  87. #define timezone __timezone   
  88. #define tzname   __tzname   
  89. #define daylight __daylight   
  90. #define tzset    __tzset
  91.  
  92.  
  93. #define TZ  "CST6"      /* Used if TZ env. var. is not set */
  94. #define DAY0  4         /* Jan 1, 1970 is a Thursday */
  95.  
  96. #endif /* _STRICT_ANSI */
  97.  
  98. /***
  99. *     SAS external variables
  100. ***/
  101.  
  102. extern int  __daylight;
  103. extern long __timezone;
  104. extern char *__tzname[2];
  105. extern char __tzstn[4];
  106. extern char __tzdtn[4];
  107. extern char *_TZ;
  108.  
  109.  
  110. #endif
  111.